package 类与对象.内部类.成员内部类;

public class Outer {
    public static void main(String[] args) {
        Outer outer = new Outer();
        outer.test();
    }
    private int n1 = 10;

    private void test1(){
        System.out.println("私有方法test1");
    }

    public String name = "李四";

    class Inner{
        public void say(){
            System.out.println(name + n1 + "岁了");
            test1();
        }
    }

    public void test(){
        Inner inner = new Inner();
        inner.say();
    }
}
